package com.xbongbong.paas.pojo;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.pro.detailtab.pojo.BomVersionPojo;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/1/24 11:25
 * @since v1.0
 */
@Getter
@Setter
public class DataDetailPojo {
    /**
     * 详情按钮列表
     */
    private List<ButtonPojo> button;
    /**
     * 表头
     */
    private DetailTitlePojo title;
    /**
     * 呼叫中心号码
     */
    private List<DetaPhonePojo> dial;
    /**
     * 阿里云呼叫中心号码
     */
    private List<DetaPhonePojo> aliyunCallCenterDial;
    /**
     * 二级标题/副标题
     */
    private JSONArray secondTitle;
    /**
     * 标签
     */
    private JSONArray tags;
    /**
     * 工作流程
     */
    private List<WorkFlowPojo> workFlow;
    /**
     * bom版本
     */
    private BomVersionPojo bomVersionPojo;
    /**
     * 是否跨月
     */
    private Boolean crossMonth;
    /**
     * 有tab顺序编辑的权限
     */
    private Boolean tabSortPermission;
    /**
     * 详情页是否有外链分享按钮
     */
    private Integer hasOuterLinkShare;

    /**
     * 展示的评分（客户，线索详情页需要）
     */
    private String score;


    public DataDetailPojo() {
    }

    public static void setDataDetailPOJO(DataDetailPojo dataDetailPojo, UserVO userVO, List<ButtonPojo> button, DetailTitlePojo title, JSONArray secondTitle, JSONArray tags, List<WorkFlowPojo> workFlow) {
        dataDetailPojo.setTabSortPermission(userVO.isAdminOrBoss());
        dataDetailPojo.setButton(button);
        dataDetailPojo.setTitle(title);
        dataDetailPojo.setSecondTitle(secondTitle);
        dataDetailPojo.setTags(tags);
        dataDetailPojo.setWorkFlow(workFlow);
    }
}
